#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
using namespace std;
int main1003()
{
	double length;
	while(cin >> length)
	{
		if (fabs(length) < 0.000001)
		{
			break;
		}
		int n = 1;
		double sum = 0.5;
		while (sum < length)
		{
			n ++;
			sum += 1.0 / (n + 1);
		}
		cout << n << " card(s)" << endl;
	}
	return 0;
}